/*
 *  MutaSim - an artificial life simulator based on cellular automata.
 *  Copyright (C) 2009-2010 Alexei Tereschenko <aytereschenko@gmail.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package tilex.sim;

import java.awt.Color;


public class Palette {

	private final static Color[]	palette	= new Color[] {
											new Color(0x000000), //black - 0
					new Color(0x000080), //navy - 1
					new Color(0x008000), //green - 2
					new Color(0x008080), //teal - 3
					new Color(0x800000), //maroon - 4
					new Color(0x800080), //purple - 5
					new Color(0x808000), //olive - 6
					new Color(0xC0C0C0), //silver - 7
					new Color(0x808080), //gray - 8
					new Color(0x0000FF), //blue - 9
					new Color(0x00FF00), //lime - 10
					new Color(0x00FFFF), //cyan - 11
					new Color(0xFF0000), //red - 12
					new Color(0xFF00FF), //magenta - 13
					new Color(0xFFFF00), //yellow - 14
					new Color(0xFFFFFF)	//white - 15
											};

	public static Color getColor(int i) {
		return palette[i % 16];
	}
}
